<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html lang="zh-cn">
    <head>
        <title>Hiring-找回密码</title>
        <%@ include file="/WEB-INF/view/common/import.jsp"%>
	    <style>
	    	.password {
	    		width: 200px;
	    		display: inline;
	    	}
	    </style>
    </head>
    <body>
    	<div class="container">
	 	   <c:if test="${! empty msg }">
			 <div class="alert alert-warning alert-dismissible fade in text-center" role="alert">
			   <button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
			   <strong>${msg }</strong>
			 </div>
	 	   </c:if>
    		<h1>发送重置密码邮件</h1>
			<form class="form-horizontal" role="form" novalidate="novalidate" action="<%=request.getContextPath()%>/CommonServlet?command=sendEmail" method="POST">
			  <input type="hidden" name="accountType" value="${param.accountType }"/>
			  <div class="form-group">
			    <label for="inputEmail3" class="col-sm-2 control-label">Email:</label>
			    <div class="col-sm-10">
			      <input type="email" class="form-control" id="inputEmail3" name="email" value="${email }">
			    </div>
			  </div>
			  <div class="form-group">
			    <label for="inputValidateCode" class="col-sm-2 control-label">验证码:</label>
			    <div class="col-sm-10">
			      <input type="text" class="form-control password" id="inputValidateCode" maxlength="4" name="validateCode" autocomplete="off">
			      <img src="<%=request.getContextPath()%>/kaptcha.jpg" onclick="changePic(this)" width="90" height="30">
			    </div>
			  </div>
			  <div class="form-group">
			    <div class="col-sm-offset-2 col-sm-10">
			      <button type="submit" class="btn btn-primary">发 送</button>
			    </div>
			  </div>
			</form>
    	</div>
		<script>
			/**
			 * 更换验证码图片
			 */
			function changePic(obj) {
				obj.src='<%=request.getContextPath()%>/kaptcha.jpg?time=' + new Date().getTime();
			}
		</script>
    </body>
</html>
